#ifndef __WENX_CONST__
#define __WENX_CONST__

#define set(var,mask) ((var)|=(mask));
#define clr(var,mask) ((var)&=~(mask));
#define change(var,mask) ((var)^=(mask));

#define SWITCH MCF_GPIO_SETTE

#define LED MCF_GPIO_PORTTH
#define LED0 MCF_GPIO_PORTTH_PORTTH2
#define LED1 MCF_GPIO_PORTTH_PORTTH5
#define LED2 MCF_GPIO_PORTTH_PORTTH3
#define LED3 MCF_GPIO_PORTTH_PORTTH4
#define LEDon(mask) set(MCF_GPIO_SETTH,mask);
#define LEDoff(mask) set(MCF_GPIO_CLRTH,mask);

#define BIT0                   (0x1)
#define BIT1                   (0x2)
#define BIT2                   (0x4)
#define BIT3                   (0x8)
#define BIT4                   (0x10)
#define BIT5                   (0x20)
#define BIT6                   (0x40)
#define BIT7                   (0x80)
#define BIT8                   (0x100)
#define BIT9                   (0x200)
#define BIT10                  (0x400)
#define BIT11                  (0x800)
#define BIT12                  (0x1000)
#define BIT13                  (0x2000)
#define BIT14                  (0x4000)
#define BIT15                  (0x8000)
#define BIT16                  (0x10000)
#define BIT17                  (0x20000)
#define BIT18                  (0x40000)
#define BIT19                  (0x80000)
#define BIT20                  (0x100000)
#define BIT21                  (0x200000)
#define BIT22                  (0x400000)
#define BIT23                  (0x800000)
#define BIT24                  (0x1000000)
#define BIT25                  (0x2000000)
#define BIT26                  (0x4000000)
#define BIT27                  (0x8000000)
#define BIT28                  (0x10000000)
#define BIT29                  (0x20000000)
#define BIT30                  (0x40000000)
#define BIT31                  (0x80000000)

#define SYSCLK 80000000
#define BUSCLK 40000000

void delayms(int ms);
void solve();
#endif